<%= page_title "New Secret Sharing Grant" %>

<section>
  <%= form_for @secret_sharing_grant, html: { class: "form-horizontal" } do |form| %>
    <%= redirect_to_field %>
    <%= render 'shared/errors', object: @secret_sharing_grant %>
    <%= form.input :key, required: true do %>
      <%= form.select :key, Samson::Secrets::Manager.shareable_keys, {required: true}, Samson::FormBuilder::LIVE_SELECT_OPTIONS %>
    <% end %>
    <%= form.input :project_id, required: true do %>
      <% projects = Project.order(:name).pluck(:name, :id) %>
      <%= form.select :project_id, projects, {}, Samson::FormBuilder::LIVE_SELECT_OPTIONS %>
    <% end %>
    <hr>

    <%= form.actions %>
  <% end %>
</section>
